---
id: get-all-datasets
title: Get All Datasets Node
sidebar_label: Get All Datasets
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

![Get All Datasets Node Screenshot](./assets/get-all-datasets-node.png)

## Overview

The Get All Datasets Node is used to retrieve all datasets available in the current project. This node is particularly useful when you want to access and manipulate multiple datasets in your graph, or search through all datasets for a specific dataset.

The node requires a dataset provider to be available in the context when the graph is being run. The dataset provider is responsible for managing the storage and retrieval of datasets. In the Rivet application, the dataset provider is handled for you automatically.

For more information on datasets, see the [Data Studio](../user-guide/features/data-studio.md) section of the user guide.

<Tabs
  defaultValue="inputs"
  values={[
    {label: 'Inputs', value: 'inputs'},
    {label: 'Outputs', value: 'outputs'},
    {label: 'Editor Settings', value: 'settings'},
  ]
}>

<TabItem value="inputs">

The Get All Datasets Node does not have any inputs.

</TabItem>

<TabItem value="outputs">

## Outputs

| Title    | Data Type  | Description                                                                                | Notes                                                                           |
| -------- | ---------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| Datasets | `object[]` | An array of all datasets in the current project. Each dataset is represented as an object. | If no datasets exist in the current project, the output will be an empty array. |

### Object Structure

Each dataset in the `Datasets` output is represented as an object with the following properties:

| Title       | Data Type | Description                     | Notes |
| ----------- | --------- | ------------------------------- | ----- |
| id          | `string`  | The ID of the dataset.          |       |
| name        | `string`  | The name of the dataset.        |       |
| description | `string`  | The description of the dataset. |       |

Note that the actual data of the dataset is not included in the output. To retrieve the data of a dataset, use the [Load Dataset Node](./load-dataset.mdx).

</TabItem>

<TabItem value="settings">

The Get All Datasets Node does not have any configurable editor settings.

</TabItem>

</Tabs>

## Example: Retrieve all datasets in a project

1. In the [Data Studio](../user-guide/features/data-studio.md), create a few datasets with different IDs.
2. Create a Get All Datasets Node in your graph.
3. Run the graph. The `Datasets` output of the Get All Datasets Node should contain an array of all datasets in the current project.

![Get All Datasets Node Example](./assets/get-all-datasets-node-example-01.png)

## Error Handling

The Get All Datasets Node will error if the dataset provider is not available in the context when the graph is being run.

## FAQ

**Q: What is a dataset provider?**

A: A dataset provider is an object that is responsible for managing the storage and retrieval of datasets. It is passed to the context when the graph is being run. The dataset provider must implement the `DatasetProvider` interface, which includes methods for getting, putting, and deleting datasets. See the [API Reference](../api-reference.md) for more information.

**Q: Can I filter the datasets returned by the Get All Datasets Node?**

A: No, the Get All Datasets Node will return all datasets in the current project. If you want to filter the datasets, you can use other nodes to process the output of the Get All Datasets Node, such as the [Filter Node](./filter.mdx) or [Extract Object Path Node](./extract-object-path.mdx)

**Q: What happens if there are no datasets in the current project?**

A: If there are no datasets in the current project, the `Datasets` output of the Get All Datasets Node will be an empty array.

## See Also

- [Load Dataset Node](./load-dataset.mdx)
- [Append to Dataset Node](./append-to-dataset.mdx)
- [Create Dataset Node](./create-dataset.mdx)
- [KNN Dataset Node](./knn-dataset.mdx)
- [Get Dataset Row Node](./get-dataset-row.mdx)
